package com.mingqijia.gassafety.webserver.feign;

import com.gap.basic.base.CommonResponse;
import com.mingqijia.gassafety.webserver.request.console.sk.ConsoleSkAlarmGroupRequest;
import com.mingqijia.gassafety.webserver.request.console.sk.ConsoleSkAlarmMapListRequest;
import com.mingqijia.gassafety.webserver.request.console.sk.ConsoleSkDeviceListRequest;
import com.mingqijia.gassafety.webserver.request.console.sk.ConsoleSkRecordsRequest;
import com.mingqijia.gassafety.webserver.request.console.sk.ConsoleSkUpdateRequest;
import com.mingqijia.gassafety.webserver.request.console.sk.*;
import com.mingqijia.gassafety.webserver.response.sk.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import com.mingqijia.gassafety.webserver.response.sk.ConsoleSkAlarmCountResponse;
import com.mingqijia.gassafety.webserver.response.sk.ConsoleSkAlarmFaultListResponse;
import com.mingqijia.gassafety.webserver.response.sk.ConsoleSkAlarmMapGroupResponse;
import com.mingqijia.gassafety.webserver.response.sk.ConsoleSkAlarmMapListResponse;
import com.mingqijia.gassafety.webserver.response.sk.ConsoleSkDeviceListResponse;
import com.mingqijia.gassafety.webserver.response.sk.ConsoleSkDeviceRunStatisticsResponse;
import com.mingqijia.gassafety.webserver.response.sk.ConsoleSkRecordLogResponse;
import com.mingqijia.gassafety.webserver.response.sk.ConsoleSkRecordsResponse;
import com.mingqijia.gassafety.webserver.response.sk.ConsoleSkUpdateResponse;
import com.mingqijia.gassafety.webserver.response.sk.ConsoleSkUserListResponse;

import io.swagger.annotations.ApiParam;

/**
 * 智慧厨房查询报警器信息接口：1-SOS报警器，2-水浸报警器，3-烟雾报警器，4-智能门锁
 * 
 * @author solyutian
 * @date 2023/6/27 09:51
 */
@FeignClient(value = "${console.sk.feign.env}", url = "${console.sk.feign.env.url:}")
public interface ConsoleSkFeignClient {

    /**
     * 查询报警信息列表
     * 
     * @param request
     * @return
     */
    @PostMapping(value = "iot/sk/inner/alarm/sos/records", produces = "application/json;charset=utf-8")
    ConsoleSkRecordsResponse alarmSOSRecords(@RequestBody ConsoleSkRecordsRequest request);

    /**
     * 获取工单七日统计
     * 
     * @param spId
     * @return
     */
    @GetMapping(value = "iot/sk/inner/alarm/sos/recordLogList", produces = "application/json;charset=utf-8")
    ConsoleSkRecordLogResponse alarmSOSRecordLogList(@RequestParam("spId") @ApiParam("spId") String spId);

    /**
     * 更新记录状态
     * 
     * @param request
     * @return
     */
    @PostMapping(value = "iot/sk/inner/alarm/sos/update", produces = "application/json;charset=utf-8")
    ConsoleSkUpdateResponse alarmSOSUpdate(@RequestBody ConsoleSkUpdateRequest request);

    /**
     * 设备运行统计
     * 
     * @param spId
     * @return
     */
    @GetMapping(value = "iot/sk/inner/alarm/sos/deviceRunStatistics", produces = "application/json;charset=utf-8")
    ConsoleSkDeviceRunStatisticsResponse alarmSOSDeviceRunStatistics(@RequestParam("spId") String spId);

    /**
     * 当日告警总数
     * 
     * @param spId
     * @return
     */
    @GetMapping(value = "iot/sk/inner/alarm/sos/alarmCount", produces = "application/json;charset=utf-8")
    ConsoleSkAlarmCountResponse alarmSOSAlarmCount(@RequestParam("spId") String spId);

    /**
     * 设备列表
     * 
     * @param request
     * @return
     */
    @PostMapping(value = "iot/sk/inner/alarm/sos/deviceList", produces = "application/json;charset=utf-8")
    ConsoleSkDeviceListResponse alarmSOSDeviceList(@RequestBody ConsoleSkDeviceListRequest request);

    /**
     * Description: 请求家庭用户列表 <br>
     * 
     * @author 王伟<br>
     * @taskId <br>
     * @param deviceId
     * @return <br>
     */
    @PostMapping(value = "iot/sk/inner/alarm/sos/userList", produces = "application/json;charset=utf-8")
    ConsoleSkUserListResponse alarmSOSUserList(@RequestParam("deviceId") String deviceId);


    /**
     * 地图分组组合数据
     * 
     * @param zoom
     * @param spId
     * @return
     */
    @PostMapping(value = "iot/sk/inner/alarm/sos/map/group", produces = "application/json;charset=utf-8")
    CommonResponse<ConsoleSkAlarmMapGroupResponse> alarmSOSMapGroup(@RequestBody ConsoleSkAlarmGroupRequest request);


    /**
     * 地图分组数据
     *
     * @param request
     * @return
     */
    @PostMapping(value = "iot/sk/inner/alarm/sos/map/list", produces = "application/json;charset=utf-8")
    CommonResponse<ConsoleSkAlarmMapListResponse> alarmSOSMapList(@RequestBody ConsoleSkAlarmMapListRequest request);

    /**
     * 故障|告警设备数据
     * @param spId
     * @return
     */
    @PostMapping(value = "iot/sk/inner/alarm/sos/fault/list", produces = "application/json;charset=utf-8")
    CommonResponse<ConsoleSkAlarmFaultListResponse> alarmSOSFaultList(@RequestParam("spId") String spId);

    /**
     * Description: 厨房接入供应商 <br>
     *
     * @author 王伟<br>
     * @taskId <br>
     * @return <br>
     */
    @GetMapping(value = "iot/sk/inner/alarm/supplier/list", produces = "application/json;charset=utf-8")
    ConsoleSkSupplierListResponse alarmSupplierList();


    /*
     * Description: 厨房解绑设备 <br>
     *
     * @author 王伟<br>
     * @taskId <br>
     * @param request
     * @return <br>
     */
    @PostMapping(value = "iot/sk/v1/home/device/delete", produces = "application/json;charset=utf-8")
    String homeDeviceDelete(@RequestBody HomeDeviceDeleteRequest request);

    /**
     * Description: 解绑设备通知 <br>
     *
     * @author 王伟<br>
     * @taskId <br>
     * @param request
     * @return <br>
     */
    @PostMapping(value = "iot/sk/v1/home/device/unBindNotice", produces = "application/json;charset=utf-8")
    String homeDeviceUnBindNotice(@RequestBody HomeDeviceBindNoticeRequest request);

    /**
     * Description: 厨房绑定设备通知 <br>
     *
     * @author 王伟<br>
     * @taskId <br>
     * @param request
     * @return <br>
     */
    @PostMapping(value = "iot/sk/v1/home/device/bindNotice", produces = "application/json;charset=utf-8")
    String homeDeviceBindNotice(@RequestBody HomeDeviceBindNoticeRequest request);

    /**
     * 设备运行统计
     *
     * @param request
     * @return
     */
    @PostMapping(value = "iot/sk/inner/alarm/sos/deviceRunList", produces = "application/json;charset=utf-8")
    ConsoleSkDeviceRunListResponse alarmSOSDeviceRunList(@RequestBody ConsoleSkDeviceRunListRequest request);

    /**
     * 安全智能设备信息
     *
     * @param spId
     * @return
     */
    @GetMapping(value = "iot/sk/inner/alarm/sos/securityDeviceData", produces = "application/json;charset=utf-8")
    ConsoleSkAlarmSecurityDeviceDataResponse alarmSecurityDeviceData(@RequestParam("spId") @ApiParam("spId") String spId);


    /**
     * 当日告警总数
     *
     * @param spId
     * @return
     */
    @GetMapping(value = "iot/sk/inner/alarm/sos/alarmCountList", produces = "application/json;charset=utf-8")
    ConsoleSkAlarmCountListResponse alarmSosAlarmCountList(@RequestParam("spId") @ApiParam("spId") String spId);


    /**
     * 告警/恢复通知
     * @param request
     * @return
     */
    @PostMapping(value = "iot/sk/inner/alarm/statusNotice", produces = "application/json;charset=utf-8")
    ConsoleSkAlarmStatusNoticeResponse alarmStatusNotice(@RequestBody ConsoleSkAlarmStatusNoticeRequest request);

}
